<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'warrant.label', default: 'Warrant')}"/>
    <title>编辑抵押权证信息</title>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>PLS CINDATA</li>
                    <li class="active">
                        <span>编辑抵押权证信息</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                编辑抵押权证信息
            </h2>
        </div>
    </div>
</div>

<g:form resource="${this.warrant}" method="PUT">
    <g:if test="${flash.message}">
        <div class="message alert alert-info" role="status">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${this.menu}">
        <ul class="errors" role="alert">
            <g:eachError bean="${this.menu}" var="error">
                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                        error="${error}"/></li>
            </g:eachError>
        </ul>
    </g:hasErrors>

    <g:textField class="form-control hidden" type="text" name="targetUri" id="targetUri" value="${params.targetUri}"/>
    <g:textField class="form-control hidden" type="text" name="collateral.id" id="collateral" value="${this.warrant?.collateral?.id}"/>

    <div class="content animate-panel">
        <div class="row">
            <div class="hpanel hblue">
                <div class="panel-heading">
                    抵押权证信息
                </div>

                <div class="panel-body form-horizontal">

                    <div class="form-group">
                        <label class="col-md-2 control-label">权利证明编号</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="serialNumber" id="serialNumber" value="${this.warrant?.serialNumber}"/>
                        </div>

                        <label class="col-md-2 control-label">权利证明类型</label>
                        <div class="col-md-3">
                            <g:select class="form-control m-b" name="type" id="type" from="${com.cindata.dictionary.WarrantType.list()}" optionValue="name" optionKey="id" value="${this.warrant?.type?.id}" noSelection="${['': '请选择权利证明类型']}"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">权利证明名称</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="name" id="name" value="${this.warrant?.name}"/>
                        </div>
                        <label class="col-md-2 control-label">关联担保合同</label>
                        <div class="col-md-3">
                            <g:select class="form-control m-b" name="contract" id="contract" from="${com.cindata.Contract.list()}" optionValue="serialNumber" optionKey="id" value="${this.warrant?.contract?.id}" noSelection="${['': '请选择权利证明类型']}"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">权利金额</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="amount" id="amount" value="${this.warrant?.amount}"/>
                        </div>
                        <label class="col-md-2 control-label">抵押登记机关</label>
                        <div class="col-md-3">
                            <g:select class="form-control m-b" name="account" id="account" from="${com.cindata.Account.list()}" optionValue="name" optionKey="id" value="${this.warrant?.account?.id}" noSelection="${['': '请选择权利证明类型']}"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">抵押登记日期</label>
                        <div class="col-md-3">
                            <g:datePicker class="form-control" name="registerDate" value="${new Date()}" precision="minute"/>
                        </div>
                    </div>


                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="update" value="保存"/>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

</g:form>

</body>
</html>
